using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._MosaicDataset
{
    /// <summary>
    /// <para>Generate Raster Collection</para>
    /// <para>Performs batch analysis or processing on image collections contained in a mosaic dataset. The images in the input mosaic dataset can be processed individually or as groups.</para>
    /// <para>对镶嵌数据集中包含的影像集合执行批量分析或处理。输入镶嵌数据集中的图像可以单独处理，也可以成组处理。</para>
    /// </summary>    
    [DisplayName("Generate Raster Collection")]
    public class GenerateRasterCollection : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateRasterCollection()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_raster_collection">
        /// <para>Output Raster Collection</para>
        /// <para>The full path of the mosaic dataset to be created. The mosaic dataset must be stored in a geodatabase.</para>
        /// <para>要创建的镶嵌数据集的完整路径。镶嵌数据集必须存储在地理数据库中。</para>
        /// </param>
        /// <param name="_collection_builder">
        /// <para>Collection Builder</para>
        /// <para><xdoc>
        ///   <para>The input image collection. It can be seen as a template that contains arguments such as the source mosaic dataset path, filters to extract a subset from the input data source, and so on.</para>
        ///   <para>Currently, this tool only supports Simple Collection, which allows you to define a single data source and a query filter, for the data source.</para>
        ///   <bulletList>
        ///     <bullet_item>Simple collection—Allows you to define a data source and a query filter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入图像集合。它可以看作是一个模板，其中包含源镶嵌数据集路径、用于从输入数据源中提取子集的过滤器等参数。</para>
        ///   <para>目前，此工具仅支持简单集合，它允许您为数据源定义单个数据源和查询筛选器。</para>
        ///   <bulletList>
        ///     <bullet_item>简单集合 - 允许您定义数据源和查询过滤器。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_collection_builder_arguments">
        /// <para>Collection Builder Arguments</para>
        /// <para><xdoc>
        ///   <para>The list of arguments to create a subset collection of the mosaic dataset.</para>
        ///   <para>This tool only supports the data source and filter to subset the mosaic dataset. The Data Source and Where Clause values must be completed, otherwise the tool cannot be executed.</para>
        ///   <bulletList>
        ///     <bullet_item>Data Source—The path of the data source.</bullet_item><para/>
        ///     <bullet_item>Where Clause—The filter used to subset the mosaic dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于创建镶嵌数据集的子集集合的参数列表。</para>
        ///   <para>此工具仅支持数据源和过滤器以子集嵌数据集。必须完成“数据源”和“Where 子句”值，否则无法执行该工具。</para>
        ///   <bulletList>
        ///     <bullet_item>数据源 - 数据源的路径。</bullet_item><para/>
        ///     <bullet_item>Where 子句 - 用于对镶嵌数据集进行子集的过滤器。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public GenerateRasterCollection(object _out_raster_collection, _collection_builder_value? _collection_builder, object _collection_builder_arguments)
        {
            this._out_raster_collection = _out_raster_collection;
            this._collection_builder = _collection_builder;
            this._collection_builder_arguments = _collection_builder_arguments;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Generate Raster Collection";

        public override string CallName => "management.GenerateRasterCollection";

        public override List<string> AcceptEnvironments => ["parallelProcessingFactor", "pyramid", "rasterStatistics"];

        public override object[] ParameterInfo => [_out_raster_collection, _collection_builder.GetGPValue(), _collection_builder_arguments, _raster_function, _raster_function_arguments, _collection_properties, _generate_rasters.GetGPValue(), _out_workspace, _format.GetGPValue(), _out_base_name];

        /// <summary>
        /// <para>Output Raster Collection</para>
        /// <para>The full path of the mosaic dataset to be created. The mosaic dataset must be stored in a geodatabase.</para>
        /// <para>要创建的镶嵌数据集的完整路径。镶嵌数据集必须存储在地理数据库中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Collection")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster_collection { get; set; }


        /// <summary>
        /// <para>Collection Builder</para>
        /// <para><xdoc>
        ///   <para>The input image collection. It can be seen as a template that contains arguments such as the source mosaic dataset path, filters to extract a subset from the input data source, and so on.</para>
        ///   <para>Currently, this tool only supports Simple Collection, which allows you to define a single data source and a query filter, for the data source.</para>
        ///   <bulletList>
        ///     <bullet_item>Simple collection—Allows you to define a data source and a query filter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入图像集合。它可以看作是一个模板，其中包含源镶嵌数据集路径、用于从输入数据源中提取子集的过滤器等参数。</para>
        ///   <para>目前，此工具仅支持简单集合，它允许您为数据源定义单个数据源和查询筛选器。</para>
        ///   <bulletList>
        ///     <bullet_item>简单集合 - 允许您定义数据源和查询过滤器。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Collection Builder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _collection_builder_value? _collection_builder { get; set; }

        public enum _collection_builder_value
        {
            /// <summary>
            /// <para>Simple collection</para>
            /// <para>Simple collection—Allows you to define a data source and a query filter.</para>
            /// <para>简单集合 - 允许您定义数据源和查询过滤器。</para>
            /// </summary>
            [Description("Simple collection")]
            [GPEnumValue("SIMPLE_COLLECTION")]
            _SIMPLE_COLLECTION,

        }

        /// <summary>
        /// <para>Collection Builder Arguments</para>
        /// <para><xdoc>
        ///   <para>The list of arguments to create a subset collection of the mosaic dataset.</para>
        ///   <para>This tool only supports the data source and filter to subset the mosaic dataset. The Data Source and Where Clause values must be completed, otherwise the tool cannot be executed.</para>
        ///   <bulletList>
        ///     <bullet_item>Data Source—The path of the data source.</bullet_item><para/>
        ///     <bullet_item>Where Clause—The filter used to subset the mosaic dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于创建镶嵌数据集的子集集合的参数列表。</para>
        ///   <para>此工具仅支持数据源和过滤器以子集嵌数据集。必须完成“数据源”和“Where 子句”值，否则无法执行该工具。</para>
        ///   <bulletList>
        ///     <bullet_item>数据源 - 数据源的路径。</bullet_item><para/>
        ///     <bullet_item>Where 子句 - 用于对镶嵌数据集进行子集的过滤器。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Collection Builder Arguments")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _collection_builder_arguments { get; set; }


        /// <summary>
        /// <para>Input Raster Function</para>
        /// <para>The path to a raster function template file (.rft.xml or .rft.json). The raster function template will be applied to every item in the input mosaic dataset. The Function Editor can be used to create the template. If no RFT is defined, this tool will create the output mosaic based on the Collection Builder Arguments parameter.</para>
        /// <para>栅格函数模板文件的路径（.rft.xml 或 .rft.json）。栅格函数模板将应用于输入镶嵌数据集中的每个项目。函数编辑器可用于创建模板。如果未定义 RFT，则此工具将基于集合生成器参数创建输出镶嵌。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster Function")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _raster_function { get; set; } = null;


        /// <summary>
        /// <para>Raster Function Arguments</para>
        /// <para><xdoc>
        ///   <para>The parameters associated with the function chain.</para>
        ///   <para>For example, if the function chain applies the NDVI function, set the visible and infrared IDs. The raster variable name of the RFT should be the Tag field value in the input data source.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>与函数链关联的参数。</para>
        ///   <para>例如，如果函数链应用了 NDVI 函数，则设置可见光和红外 ID。RFT 的栅格变量名称应为输入数据源中的标签字段值。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Raster Function Arguments")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _raster_function_arguments { get; set; } = null;


        /// <summary>
        /// <para>Raster Collection Properties</para>
        /// <para><xdoc>
        ///   <para>The output mosaic dataset key properties.</para>
        ///   <para>The key metadata properties that are available is based on the type of sensor that captured the imagery. Some examples of key metadata properties include the following:
        ///   <bulletList>
        ///     <bullet_item>SensorName  </bullet_item><para/>
        ///     <bullet_item>ProductName  </bullet_item><para/>
        ///     <bullet_item>AcquisitionDate  </bullet_item><para/>
        ///     <bullet_item>CloudCover  </bullet_item><para/>
        ///     <bullet_item>SunAzimuth  </bullet_item><para/>
        ///     <bullet_item>SunElevation  </bullet_item><para/>
        ///     <bullet_item>SensorAzimuth  </bullet_item><para/>
        ///     <bullet_item>SensorElevation  </bullet_item><para/>
        ///     <bullet_item>Off-nadirAngle  </bullet_item><para/>
        ///     <bullet_item>BandName  </bullet_item><para/>
        ///     <bullet_item>MinimumWavelength  </bullet_item><para/>
        ///     <bullet_item>MaximumWavelength  </bullet_item><para/>
        ///     <bullet_item>RadianceGain  </bullet_item><para/>
        ///     <bullet_item>RadianceBias  </bullet_item><para/>
        ///     <bullet_item>SolarIrradiance  </bullet_item><para/>
        ///     <bullet_item>ReflectanceGain  </bullet_item><para/>
        ///     <bullet_item>ReflectanceBias  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出镶嵌数据集关键属性。</para>
        /// <para>可用的关键元数据属性基于捕获影像的传感器类型。关键元数据属性的一些示例包括：
        ///   <bulletList>
        ///     <bullet_item>传感器名称</bullet_item><para/>
        ///     <bullet_item>产品名称</bullet_item><para/>
        ///     <bullet_item>收购日期</bullet_item><para/>
        ///     <bullet_item>云盖</bullet_item><para/>
        ///     <bullet_item>太阳方位角</bullet_item><para/>
        ///     <bullet_item>太阳海拔</bullet_item><para/>
        ///     <bullet_item>传感器方位角</bullet_item><para/>
        ///     <bullet_item>传感器高程</bullet_item><para/>
        ///     <bullet_item>Off-nadirAngle （离最低点角度）</bullet_item><para/>
        ///     <bullet_item>乐队名称</bullet_item><para/>
        ///     <bullet_item>最小波长</bullet_item><para/>
        ///     <bullet_item>最长</bullet_item><para/>
        ///     <bullet_item>辐射增益</bullet_item><para/>
        ///     <bullet_item>辐射偏差</bullet_item><para/>
        ///     <bullet_item>太阳辐照度</bullet_item><para/>
        ///     <bullet_item>反射率增益</bullet_item><para/>
        ///     <bullet_item>反射率偏差</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Raster Collection Properties")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _collection_properties { get; set; } = null;


        /// <summary>
        /// <para>Generate Rasters</para>
        /// <para><xdoc>
        ///   <para>Generate raster dataset files of the mosaic dataset items, after the application of the RFT.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The processing defined by the raster function template will be appended to the image items from the input data source to produce an image item in the output mosaic dataset. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Create raster datasets on disk. You will also need to specify the Output Raster Workspace and Format.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>应用RFT后，生成镶嵌数据集项目的栅格数据集文件。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 栅格函数模板定义的处理将追加到输入数据源中的图像项目，以在输出镶嵌数据集中生成影像项目。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 - 在磁盘上创建栅格数据集。您还需要指定输出栅格工作空间和格式。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate Rasters")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _generate_rasters_value _generate_rasters { get; set; } = _generate_rasters_value._false;

        public enum _generate_rasters_value
        {
            /// <summary>
            /// <para>GENERATE_RASTERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GENERATE_RASTERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_GENERATE_RASTERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_GENERATE_RASTERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Raster Workspace</para>
        /// <para><xdoc>
        ///   <para>Defines the output location for the persisted raster datasets, if the Generate Rasters parameter is checked on.</para>
        ///   <para>The naming convention for the output raster files is oid_<oid#>_<Unique_GUID>.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>如果选中了生成栅格参数，则定义持久栅格数据集的输出位置。</para>
        /// <para>输出栅格文件的命名约定为 oid_<oid#>_<Unique_GUID>。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_workspace { get; set; } = null;


        /// <summary>
        /// <para>Format</para>
        /// <para><xdoc>
        ///   <para>The format type of the raster to be generated.</para>
        ///   <bulletList>
        ///     <bullet_item>Tiff—Tagged Image File Format (TIFF)</bullet_item><para/>
        ///     <bullet_item>ERDAS IMAGINE—ERDAS IMAGINE file</bullet_item><para/>
        ///     <bullet_item>CRF—Cloud Raster Format. This is the default.</bullet_item><para/>
        ///     <bullet_item>MRF—Meta Raster Format</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要生成的栅格的格式类型。</para>
        ///   <bulletList>
        ///     <bullet_item>TIFF - 标记图像文件格式 （TIFF）</bullet_item><para/>
        ///     <bullet_item>ERDAS IMAGINE - ERDAS IMAGINE 文件</bullet_item><para/>
        ///     <bullet_item>CRF - 云栅格格式。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>MRF - 元栅格格式</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _format_value _format { get; set; } = _format_value._CRF;

        public enum _format_value
        {
            /// <summary>
            /// <para>Tiff</para>
            /// <para>Tiff—Tagged Image File Format (TIFF)</para>
            /// <para>TIFF - 标记图像文件格式 （TIFF）</para>
            /// </summary>
            [Description("Tiff")]
            [GPEnumValue("TIFF")]
            _TIFF,

            /// <summary>
            /// <para>ERDAS IMAGINE</para>
            /// <para>ERDAS IMAGINE—ERDAS IMAGINE file</para>
            /// <para>ERDAS IMAGINE - ERDAS IMAGINE 文件</para>
            /// </summary>
            [Description("ERDAS IMAGINE")]
            [GPEnumValue("IMAGINE Image")]
            _IMAGINE_Image,

            /// <summary>
            /// <para>CRF</para>
            /// <para>CRF—Cloud Raster Format. This is the default.</para>
            /// <para>CRF - 云栅格格式。这是默认设置。</para>
            /// </summary>
            [Description("CRF")]
            [GPEnumValue("CRF")]
            _CRF,

            /// <summary>
            /// <para>MRF</para>
            /// <para>MRF—Meta Raster Format</para>
            /// <para>MRF - 元栅格格式</para>
            /// </summary>
            [Description("MRF")]
            [GPEnumValue("MRF")]
            _MRF,

        }

        /// <summary>
        /// <para>Output Base Name</para>
        /// <para><xdoc>
        ///   <para>Defines the output base name of the persisted raster datasets, if the Generate Rasters parameter is checked on. Multiple raster dataset outputs will have a number alias appended to their base name.</para>
        ///   <para>The resulting mosaic dataset will reference the CRF directly without maintaining the raster function chain.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>如果选中了生成栅格参数，则定义持久栅格数据集的输出基础名称。多个栅格数据集输出将在其基本名称后附加一个数字别名。</para>
        ///   <para>生成的镶嵌数据集将直接引用 CRF，而无需维护栅格函数链。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Base Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_base_name { get; set; } = null;


        public GenerateRasterCollection SetEnv(object parallelProcessingFactor = null, object pyramid = null, object rasterStatistics = null)
        {
            base.SetEnv(parallelProcessingFactor: parallelProcessingFactor, pyramid: pyramid, rasterStatistics: rasterStatistics);
            return this;
        }

    }

}